using System.Globalization;
using System.Windows.Controls;

namespace Theodorus
{
	public class NonZeroLengthRule : ValidationRule
	{
		public override ValidationResult Validate(object value, CultureInfo cultureInfo)
		{
		    return string.IsNullOrEmpty((string) value)
		               ?
		                   new ValidationResult(false, "Please enter something here")
		               :
		                   new ValidationResult(true, null);
		}
	}
}